<template>
  <el-config-provider :locale="locale">
    <template v-if="route.path.startsWith('/user')">
      <UserLayout />
    </template>
    <template v-else>
      <BasicLayout />
    </template>
  </el-config-provider>
</template>

<script setup lang="ts">
import UserLayout from "@/layouts/UserLayout.vue";
import BasicLayout from "@/layouts/BasicLayout.vue";
import { useRoute } from "vue-router";
import { zhCn } from "element-plus/es/locales.mjs";

const route = useRoute();

// 令 element-plus 的组件显示中文 (特别是分页)
const locale = zhCn;
</script>

<style scoped></style>
